#[doc = "Register `AUDIO_AIAO_CTRL` reader"]
pub struct R(crate::R<AUDIO_AIAO_CTRL_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<AUDIO_AIAO_CTRL_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::convert::From<crate::R<AUDIO_AIAO_CTRL_SPEC>> for R {
    fn from(reader: crate::R<AUDIO_AIAO_CTRL_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Register `AUDIO_AIAO_CTRL` writer"]
pub struct W(crate::W<AUDIO_AIAO_CTRL_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<AUDIO_AIAO_CTRL_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::ops::DerefMut for W {
    #[inline(always)]
    fn deref_mut(&mut self) -> &mut Self::Target {
        &mut self.0
    }
}
impl core::convert::From<crate::W<AUDIO_AIAO_CTRL_SPEC>> for W {
    fn from(writer: crate::W<AUDIO_AIAO_CTRL_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "TX FIFO underflow interrupt enable.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TX_RERROR_INT_MASK_A {
    #[doc = "0: disabled."]
    DISABLED = 0,
    #[doc = "1: enabled."]
    ENABLED = 1,
}
impl From<TX_RERROR_INT_MASK_A> for bool {
    #[inline(always)]
    fn from(variant: TX_RERROR_INT_MASK_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `tx_rerror_int_mask` reader - TX FIFO underflow interrupt enable."]
pub struct TX_RERROR_INT_MASK_R(crate::FieldReader<bool, TX_RERROR_INT_MASK_A>);
impl TX_RERROR_INT_MASK_R {
    pub(crate) fn new(bits: bool) -> Self {
        TX_RERROR_INT_MASK_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> TX_RERROR_INT_MASK_A {
        match self.bits {
            false => TX_RERROR_INT_MASK_A::DISABLED,
            true => TX_RERROR_INT_MASK_A::ENABLED,
        }
    }
    #[doc = "Checks if the value of the field is `DISABLED`"]
    #[inline(always)]
    pub fn is_disabled(&self) -> bool {
        **self == TX_RERROR_INT_MASK_A::DISABLED
    }
    #[doc = "Checks if the value of the field is `ENABLED`"]
    #[inline(always)]
    pub fn is_enabled(&self) -> bool {
        **self == TX_RERROR_INT_MASK_A::ENABLED
    }
}
impl core::ops::Deref for TX_RERROR_INT_MASK_R {
    type Target = crate::FieldReader<bool, TX_RERROR_INT_MASK_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `tx_rerror_int_mask` writer - TX FIFO underflow interrupt enable."]
pub struct TX_RERROR_INT_MASK_W<'a> {
    w: &'a mut W,
}
impl<'a> TX_RERROR_INT_MASK_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: TX_RERROR_INT_MASK_A) -> &'a mut W {
        self.bit(variant.into())
    }
    #[doc = "disabled."]
    #[inline(always)]
    pub fn disabled(self) -> &'a mut W {
        self.variant(TX_RERROR_INT_MASK_A::DISABLED)
    }
    #[doc = "enabled."]
    #[inline(always)]
    pub fn enabled(self) -> &'a mut W {
        self.variant(TX_RERROR_INT_MASK_A::ENABLED)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25);
        self.w
    }
}
#[doc = "RX FIFO overflow interrupt enable.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RX_WERROR_INT_MASK_A {
    #[doc = "0: disabled."]
    DISABLED = 0,
    #[doc = "1: enabled."]
    ENABLED = 1,
}
impl From<RX_WERROR_INT_MASK_A> for bool {
    #[inline(always)]
    fn from(variant: RX_WERROR_INT_MASK_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `rx_werror_int_mask` reader - RX FIFO overflow interrupt enable."]
pub struct RX_WERROR_INT_MASK_R(crate::FieldReader<bool, RX_WERROR_INT_MASK_A>);
impl RX_WERROR_INT_MASK_R {
    pub(crate) fn new(bits: bool) -> Self {
        RX_WERROR_INT_MASK_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> RX_WERROR_INT_MASK_A {
        match self.bits {
            false => RX_WERROR_INT_MASK_A::DISABLED,
            true => RX_WERROR_INT_MASK_A::ENABLED,
        }
    }
    #[doc = "Checks if the value of the field is `DISABLED`"]
    #[inline(always)]
    pub fn is_disabled(&self) -> bool {
        **self == RX_WERROR_INT_MASK_A::DISABLED
    }
    #[doc = "Checks if the value of the field is `ENABLED`"]
    #[inline(always)]
    pub fn is_enabled(&self) -> bool {
        **self == RX_WERROR_INT_MASK_A::ENABLED
    }
}
impl core::ops::Deref for RX_WERROR_INT_MASK_R {
    type Target = crate::FieldReader<bool, RX_WERROR_INT_MASK_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `rx_werror_int_mask` writer - RX FIFO overflow interrupt enable."]
pub struct RX_WERROR_INT_MASK_W<'a> {
    w: &'a mut W,
}
impl<'a> RX_WERROR_INT_MASK_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: RX_WERROR_INT_MASK_A) -> &'a mut W {
        self.bit(variant.into())
    }
    #[doc = "disabled."]
    #[inline(always)]
    pub fn disabled(self) -> &'a mut W {
        self.variant(RX_WERROR_INT_MASK_A::DISABLED)
    }
    #[doc = "enabled."]
    #[inline(always)]
    pub fn enabled(self) -> &'a mut W {
        self.variant(RX_WERROR_INT_MASK_A::ENABLED)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24);
        self.w
    }
}
#[doc = "Frequency ratio of BCLK to WS.\n\nValue on reset: 3"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum AIAO_FSCLK_DIV_A {
    #[doc = "0: 16."]
    DIV_16 = 0,
    #[doc = "1: 32."]
    DIV_32 = 1,
    #[doc = "2: 48."]
    DIV_48 = 2,
    #[doc = "3: 64."]
    DIV_64 = 3,
    #[doc = "4: 128."]
    DIV_128 = 4,
    #[doc = "5: 256."]
    DIV_256 = 5,
}
impl From<AIAO_FSCLK_DIV_A> for u8 {
    #[inline(always)]
    fn from(variant: AIAO_FSCLK_DIV_A) -> Self {
        variant as _
    }
}
#[doc = "Field `aiao_fsclk_div` reader - Frequency ratio of BCLK to WS."]
pub struct AIAO_FSCLK_DIV_R(crate::FieldReader<u8, AIAO_FSCLK_DIV_A>);
impl AIAO_FSCLK_DIV_R {
    pub(crate) fn new(bits: u8) -> Self {
        AIAO_FSCLK_DIV_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> crate::Variant<u8, AIAO_FSCLK_DIV_A> {
        use crate::Variant::*;
        match self.bits {
            0 => Val(AIAO_FSCLK_DIV_A::DIV_16),
            1 => Val(AIAO_FSCLK_DIV_A::DIV_32),
            2 => Val(AIAO_FSCLK_DIV_A::DIV_48),
            3 => Val(AIAO_FSCLK_DIV_A::DIV_64),
            4 => Val(AIAO_FSCLK_DIV_A::DIV_128),
            5 => Val(AIAO_FSCLK_DIV_A::DIV_256),
            i => Res(i),
        }
    }
    #[doc = "Checks if the value of the field is `DIV_16`"]
    #[inline(always)]
    pub fn is_div_16(&self) -> bool {
        **self == AIAO_FSCLK_DIV_A::DIV_16
    }
    #[doc = "Checks if the value of the field is `DIV_32`"]
    #[inline(always)]
    pub fn is_div_32(&self) -> bool {
        **self == AIAO_FSCLK_DIV_A::DIV_32
    }
    #[doc = "Checks if the value of the field is `DIV_48`"]
    #[inline(always)]
    pub fn is_div_48(&self) -> bool {
        **self == AIAO_FSCLK_DIV_A::DIV_48
    }
    #[doc = "Checks if the value of the field is `DIV_64`"]
    #[inline(always)]
    pub fn is_div_64(&self) -> bool {
        **self == AIAO_FSCLK_DIV_A::DIV_64
    }
    #[doc = "Checks if the value of the field is `DIV_128`"]
    #[inline(always)]
    pub fn is_div_128(&self) -> bool {
        **self == AIAO_FSCLK_DIV_A::DIV_128
    }
    #[doc = "Checks if the value of the field is `DIV_256`"]
    #[inline(always)]
    pub fn is_div_256(&self) -> bool {
        **self == AIAO_FSCLK_DIV_A::DIV_256
    }
}
impl core::ops::Deref for AIAO_FSCLK_DIV_R {
    type Target = crate::FieldReader<u8, AIAO_FSCLK_DIV_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `aiao_fsclk_div` writer - Frequency ratio of BCLK to WS."]
pub struct AIAO_FSCLK_DIV_W<'a> {
    w: &'a mut W,
}
impl<'a> AIAO_FSCLK_DIV_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: AIAO_FSCLK_DIV_A) -> &'a mut W {
        unsafe { self.bits(variant.into()) }
    }
    #[doc = "16."]
    #[inline(always)]
    pub fn div_16(self) -> &'a mut W {
        self.variant(AIAO_FSCLK_DIV_A::DIV_16)
    }
    #[doc = "32."]
    #[inline(always)]
    pub fn div_32(self) -> &'a mut W {
        self.variant(AIAO_FSCLK_DIV_A::DIV_32)
    }
    #[doc = "48."]
    #[inline(always)]
    pub fn div_48(self) -> &'a mut W {
        self.variant(AIAO_FSCLK_DIV_A::DIV_48)
    }
    #[doc = "64."]
    #[inline(always)]
    pub fn div_64(self) -> &'a mut W {
        self.variant(AIAO_FSCLK_DIV_A::DIV_64)
    }
    #[doc = "128."]
    #[inline(always)]
    pub fn div_128(self) -> &'a mut W {
        self.variant(AIAO_FSCLK_DIV_A::DIV_128)
    }
    #[doc = "256."]
    #[inline(always)]
    pub fn div_256(self) -> &'a mut W {
        self.variant(AIAO_FSCLK_DIV_A::DIV_256)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x07 << 21)) | (((value as u32) & 0x07) << 21);
        self.w
    }
}
#[doc = "Frequency ratio of MCLK to BCLK.\n\nValue on reset: 8"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum AIAO_BCLK_DIV_A {
    #[doc = "0: 1."]
    DIV_1 = 0,
    #[doc = "1: 3."]
    DIV_3 = 1,
    #[doc = "2: 2."]
    DIV_2 = 2,
    #[doc = "3: 4."]
    DIV_4 = 3,
    #[doc = "4: 6."]
    DIV_6 = 4,
    #[doc = "5: 8."]
    DIV_8 = 5,
    #[doc = "6: 12."]
    DIV_12 = 6,
    #[doc = "7: 16."]
    DIV_16 = 7,
    #[doc = "8: 24."]
    DIV_24 = 8,
    #[doc = "9: 32."]
    DIV_32 = 9,
    #[doc = "10: 48."]
    DIV_48 = 10,
    #[doc = "11: 64."]
    DIV_64 = 11,
    #[doc = "12: 96."]
    DIV_96 = 12,
}
impl From<AIAO_BCLK_DIV_A> for u8 {
    #[inline(always)]
    fn from(variant: AIAO_BCLK_DIV_A) -> Self {
        variant as _
    }
}
#[doc = "Field `aiao_bclk_div` reader - Frequency ratio of MCLK to BCLK."]
pub struct AIAO_BCLK_DIV_R(crate::FieldReader<u8, AIAO_BCLK_DIV_A>);
impl AIAO_BCLK_DIV_R {
    pub(crate) fn new(bits: u8) -> Self {
        AIAO_BCLK_DIV_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> crate::Variant<u8, AIAO_BCLK_DIV_A> {
        use crate::Variant::*;
        match self.bits {
            0 => Val(AIAO_BCLK_DIV_A::DIV_1),
            1 => Val(AIAO_BCLK_DIV_A::DIV_3),
            2 => Val(AIAO_BCLK_DIV_A::DIV_2),
            3 => Val(AIAO_BCLK_DIV_A::DIV_4),
            4 => Val(AIAO_BCLK_DIV_A::DIV_6),
            5 => Val(AIAO_BCLK_DIV_A::DIV_8),
            6 => Val(AIAO_BCLK_DIV_A::DIV_12),
            7 => Val(AIAO_BCLK_DIV_A::DIV_16),
            8 => Val(AIAO_BCLK_DIV_A::DIV_24),
            9 => Val(AIAO_BCLK_DIV_A::DIV_32),
            10 => Val(AIAO_BCLK_DIV_A::DIV_48),
            11 => Val(AIAO_BCLK_DIV_A::DIV_64),
            12 => Val(AIAO_BCLK_DIV_A::DIV_96),
            i => Res(i),
        }
    }
    #[doc = "Checks if the value of the field is `DIV_1`"]
    #[inline(always)]
    pub fn is_div_1(&self) -> bool {
        **self == AIAO_BCLK_DIV_A::DIV_1
    }
    #[doc = "Checks if the value of the field is `DIV_3`"]
    #[inline(always)]
    pub fn is_div_3(&self) -> bool {
        **self == AIAO_BCLK_DIV_A::DIV_3
    }
    #[doc = "Checks if the value of the field is `DIV_2`"]
    #[inline(always)]
    pub fn is_div_2(&self) -> bool {
        **self == AIAO_BCLK_DIV_A::DIV_2
    }
    #[doc = "Checks if the value of the field is `DIV_4`"]
    #[inline(always)]
    pub fn is_div_4(&self) -> bool {
        **self == AIAO_BCLK_DIV_A::DIV_4
    }
    #[doc = "Checks if the value of the field is `DIV_6`"]
    #[inline(always)]
    pub fn is_div_6(&self) -> bool {
        **self == AIAO_BCLK_DIV_A::DIV_6
    }
    #[doc = "Checks if the value of the field is `DIV_8`"]
    #[inline(always)]
    pub fn is_div_8(&self) -> bool {
        **self == AIAO_BCLK_DIV_A::DIV_8
    }
    #[doc = "Checks if the value of the field is `DIV_12`"]
    #[inline(always)]
    pub fn is_div_12(&self) -> bool {
        **self == AIAO_BCLK_DIV_A::DIV_12
    }
    #[doc = "Checks if the value of the field is `DIV_16`"]
    #[inline(always)]
    pub fn is_div_16(&self) -> bool {
        **self == AIAO_BCLK_DIV_A::DIV_16
    }
    #[doc = "Checks if the value of the field is `DIV_24`"]
    #[inline(always)]
    pub fn is_div_24(&self) -> bool {
        **self == AIAO_BCLK_DIV_A::DIV_24
    }
    #[doc = "Checks if the value of the field is `DIV_32`"]
    #[inline(always)]
    pub fn is_div_32(&self) -> bool {
        **self == AIAO_BCLK_DIV_A::DIV_32
    }
    #[doc = "Checks if the value of the field is `DIV_48`"]
    #[inline(always)]
    pub fn is_div_48(&self) -> bool {
        **self == AIAO_BCLK_DIV_A::DIV_48
    }
    #[doc = "Checks if the value of the field is `DIV_64`"]
    #[inline(always)]
    pub fn is_div_64(&self) -> bool {
        **self == AIAO_BCLK_DIV_A::DIV_64
    }
    #[doc = "Checks if the value of the field is `DIV_96`"]
    #[inline(always)]
    pub fn is_div_96(&self) -> bool {
        **self == AIAO_BCLK_DIV_A::DIV_96
    }
}
impl core::ops::Deref for AIAO_BCLK_DIV_R {
    type Target = crate::FieldReader<u8, AIAO_BCLK_DIV_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `aiao_bclk_div` writer - Frequency ratio of MCLK to BCLK."]
pub struct AIAO_BCLK_DIV_W<'a> {
    w: &'a mut W,
}
impl<'a> AIAO_BCLK_DIV_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: AIAO_BCLK_DIV_A) -> &'a mut W {
        unsafe { self.bits(variant.into()) }
    }
    #[doc = "1."]
    #[inline(always)]
    pub fn div_1(self) -> &'a mut W {
        self.variant(AIAO_BCLK_DIV_A::DIV_1)
    }
    #[doc = "3."]
    #[inline(always)]
    pub fn div_3(self) -> &'a mut W {
        self.variant(AIAO_BCLK_DIV_A::DIV_3)
    }
    #[doc = "2."]
    #[inline(always)]
    pub fn div_2(self) -> &'a mut W {
        self.variant(AIAO_BCLK_DIV_A::DIV_2)
    }
    #[doc = "4."]
    #[inline(always)]
    pub fn div_4(self) -> &'a mut W {
        self.variant(AIAO_BCLK_DIV_A::DIV_4)
    }
    #[doc = "6."]
    #[inline(always)]
    pub fn div_6(self) -> &'a mut W {
        self.variant(AIAO_BCLK_DIV_A::DIV_6)
    }
    #[doc = "8."]
    #[inline(always)]
    pub fn div_8(self) -> &'a mut W {
        self.variant(AIAO_BCLK_DIV_A::DIV_8)
    }
    #[doc = "12."]
    #[inline(always)]
    pub fn div_12(self) -> &'a mut W {
        self.variant(AIAO_BCLK_DIV_A::DIV_12)
    }
    #[doc = "16."]
    #[inline(always)]
    pub fn div_16(self) -> &'a mut W {
        self.variant(AIAO_BCLK_DIV_A::DIV_16)
    }
    #[doc = "24."]
    #[inline(always)]
    pub fn div_24(self) -> &'a mut W {
        self.variant(AIAO_BCLK_DIV_A::DIV_24)
    }
    #[doc = "32."]
    #[inline(always)]
    pub fn div_32(self) -> &'a mut W {
        self.variant(AIAO_BCLK_DIV_A::DIV_32)
    }
    #[doc = "48."]
    #[inline(always)]
    pub fn div_48(self) -> &'a mut W {
        self.variant(AIAO_BCLK_DIV_A::DIV_48)
    }
    #[doc = "64."]
    #[inline(always)]
    pub fn div_64(self) -> &'a mut W {
        self.variant(AIAO_BCLK_DIV_A::DIV_64)
    }
    #[doc = "96."]
    #[inline(always)]
    pub fn div_96(self) -> &'a mut W {
        self.variant(AIAO_BCLK_DIV_A::DIV_96)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x0f << 17)) | (((value as u32) & 0x0f) << 17);
        self.w
    }
}
#[doc = "TX FIFO threshold.\n\nValue on reset: 2"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum DMA_TX_LEVEL_A {
    #[doc = "0: 2."]
    LEVEL_2 = 0,
    #[doc = "1: 4."]
    LEVEL_4 = 1,
    #[doc = "2: 8."]
    LEVEL_8 = 2,
    #[doc = "3: 12."]
    LEVEL_12 = 3,
    #[doc = "4: 14."]
    LEVEL_14 = 4,
}
impl From<DMA_TX_LEVEL_A> for u8 {
    #[inline(always)]
    fn from(variant: DMA_TX_LEVEL_A) -> Self {
        variant as _
    }
}
#[doc = "Field `dma_tx_level` reader - TX FIFO threshold."]
pub struct DMA_TX_LEVEL_R(crate::FieldReader<u8, DMA_TX_LEVEL_A>);
impl DMA_TX_LEVEL_R {
    pub(crate) fn new(bits: u8) -> Self {
        DMA_TX_LEVEL_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> crate::Variant<u8, DMA_TX_LEVEL_A> {
        use crate::Variant::*;
        match self.bits {
            0 => Val(DMA_TX_LEVEL_A::LEVEL_2),
            1 => Val(DMA_TX_LEVEL_A::LEVEL_4),
            2 => Val(DMA_TX_LEVEL_A::LEVEL_8),
            3 => Val(DMA_TX_LEVEL_A::LEVEL_12),
            4 => Val(DMA_TX_LEVEL_A::LEVEL_14),
            i => Res(i),
        }
    }
    #[doc = "Checks if the value of the field is `LEVEL_2`"]
    #[inline(always)]
    pub fn is_level_2(&self) -> bool {
        **self == DMA_TX_LEVEL_A::LEVEL_2
    }
    #[doc = "Checks if the value of the field is `LEVEL_4`"]
    #[inline(always)]
    pub fn is_level_4(&self) -> bool {
        **self == DMA_TX_LEVEL_A::LEVEL_4
    }
    #[doc = "Checks if the value of the field is `LEVEL_8`"]
    #[inline(always)]
    pub fn is_level_8(&self) -> bool {
        **self == DMA_TX_LEVEL_A::LEVEL_8
    }
    #[doc = "Checks if the value of the field is `LEVEL_12`"]
    #[inline(always)]
    pub fn is_level_12(&self) -> bool {
        **self == DMA_TX_LEVEL_A::LEVEL_12
    }
    #[doc = "Checks if the value of the field is `LEVEL_14`"]
    #[inline(always)]
    pub fn is_level_14(&self) -> bool {
        **self == DMA_TX_LEVEL_A::LEVEL_14
    }
}
impl core::ops::Deref for DMA_TX_LEVEL_R {
    type Target = crate::FieldReader<u8, DMA_TX_LEVEL_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `dma_tx_level` writer - TX FIFO threshold."]
pub struct DMA_TX_LEVEL_W<'a> {
    w: &'a mut W,
}
impl<'a> DMA_TX_LEVEL_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: DMA_TX_LEVEL_A) -> &'a mut W {
        unsafe { self.bits(variant.into()) }
    }
    #[doc = "2."]
    #[inline(always)]
    pub fn level_2(self) -> &'a mut W {
        self.variant(DMA_TX_LEVEL_A::LEVEL_2)
    }
    #[doc = "4."]
    #[inline(always)]
    pub fn level_4(self) -> &'a mut W {
        self.variant(DMA_TX_LEVEL_A::LEVEL_4)
    }
    #[doc = "8."]
    #[inline(always)]
    pub fn level_8(self) -> &'a mut W {
        self.variant(DMA_TX_LEVEL_A::LEVEL_8)
    }
    #[doc = "12."]
    #[inline(always)]
    pub fn level_12(self) -> &'a mut W {
        self.variant(DMA_TX_LEVEL_A::LEVEL_12)
    }
    #[doc = "14."]
    #[inline(always)]
    pub fn level_14(self) -> &'a mut W {
        self.variant(DMA_TX_LEVEL_A::LEVEL_14)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x07 << 14)) | (((value as u32) & 0x07) << 14);
        self.w
    }
}
#[doc = "RX FIFO threshold.\n\nValue on reset: 2"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum DMA_RX_LEVEL_A {
    #[doc = "0: 2."]
    LEVEL_2 = 0,
    #[doc = "1: 4."]
    LEVEL_4 = 1,
    #[doc = "2: 8."]
    LEVEL_8 = 2,
    #[doc = "3: 12."]
    LEVEL_12 = 3,
    #[doc = "4: 14."]
    LEVEL_14 = 4,
}
impl From<DMA_RX_LEVEL_A> for u8 {
    #[inline(always)]
    fn from(variant: DMA_RX_LEVEL_A) -> Self {
        variant as _
    }
}
#[doc = "Field `dma_rx_level` reader - RX FIFO threshold."]
pub struct DMA_RX_LEVEL_R(crate::FieldReader<u8, DMA_RX_LEVEL_A>);
impl DMA_RX_LEVEL_R {
    pub(crate) fn new(bits: u8) -> Self {
        DMA_RX_LEVEL_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> crate::Variant<u8, DMA_RX_LEVEL_A> {
        use crate::Variant::*;
        match self.bits {
            0 => Val(DMA_RX_LEVEL_A::LEVEL_2),
            1 => Val(DMA_RX_LEVEL_A::LEVEL_4),
            2 => Val(DMA_RX_LEVEL_A::LEVEL_8),
            3 => Val(DMA_RX_LEVEL_A::LEVEL_12),
            4 => Val(DMA_RX_LEVEL_A::LEVEL_14),
            i => Res(i),
        }
    }
    #[doc = "Checks if the value of the field is `LEVEL_2`"]
    #[inline(always)]
    pub fn is_level_2(&self) -> bool {
        **self == DMA_RX_LEVEL_A::LEVEL_2
    }
    #[doc = "Checks if the value of the field is `LEVEL_4`"]
    #[inline(always)]
    pub fn is_level_4(&self) -> bool {
        **self == DMA_RX_LEVEL_A::LEVEL_4
    }
    #[doc = "Checks if the value of the field is `LEVEL_8`"]
    #[inline(always)]
    pub fn is_level_8(&self) -> bool {
        **self == DMA_RX_LEVEL_A::LEVEL_8
    }
    #[doc = "Checks if the value of the field is `LEVEL_12`"]
    #[inline(always)]
    pub fn is_level_12(&self) -> bool {
        **self == DMA_RX_LEVEL_A::LEVEL_12
    }
    #[doc = "Checks if the value of the field is `LEVEL_14`"]
    #[inline(always)]
    pub fn is_level_14(&self) -> bool {
        **self == DMA_RX_LEVEL_A::LEVEL_14
    }
}
impl core::ops::Deref for DMA_RX_LEVEL_R {
    type Target = crate::FieldReader<u8, DMA_RX_LEVEL_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `dma_rx_level` writer - RX FIFO threshold."]
pub struct DMA_RX_LEVEL_W<'a> {
    w: &'a mut W,
}
impl<'a> DMA_RX_LEVEL_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: DMA_RX_LEVEL_A) -> &'a mut W {
        unsafe { self.bits(variant.into()) }
    }
    #[doc = "2."]
    #[inline(always)]
    pub fn level_2(self) -> &'a mut W {
        self.variant(DMA_RX_LEVEL_A::LEVEL_2)
    }
    #[doc = "4."]
    #[inline(always)]
    pub fn level_4(self) -> &'a mut W {
        self.variant(DMA_RX_LEVEL_A::LEVEL_4)
    }
    #[doc = "8."]
    #[inline(always)]
    pub fn level_8(self) -> &'a mut W {
        self.variant(DMA_RX_LEVEL_A::LEVEL_8)
    }
    #[doc = "12."]
    #[inline(always)]
    pub fn level_12(self) -> &'a mut W {
        self.variant(DMA_RX_LEVEL_A::LEVEL_12)
    }
    #[doc = "14."]
    #[inline(always)]
    pub fn level_14(self) -> &'a mut W {
        self.variant(DMA_RX_LEVEL_A::LEVEL_14)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub unsafe fn bits(self, value: u8) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x07 << 11)) | (((value as u32) & 0x07) << 11);
        self.w
    }
}
#[doc = "Low power consumption enable.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum AIAO_CK_GT_EN_A {
    #[doc = "0: Clock disabled."]
    DISABLED = 0,
    #[doc = "1: Clock enabled."]
    ENABLED = 1,
}
impl From<AIAO_CK_GT_EN_A> for bool {
    #[inline(always)]
    fn from(variant: AIAO_CK_GT_EN_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `aiao_ck_gt_en` reader - Low power consumption enable."]
pub struct AIAO_CK_GT_EN_R(crate::FieldReader<bool, AIAO_CK_GT_EN_A>);
impl AIAO_CK_GT_EN_R {
    pub(crate) fn new(bits: bool) -> Self {
        AIAO_CK_GT_EN_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> AIAO_CK_GT_EN_A {
        match self.bits {
            false => AIAO_CK_GT_EN_A::DISABLED,
            true => AIAO_CK_GT_EN_A::ENABLED,
        }
    }
    #[doc = "Checks if the value of the field is `DISABLED`"]
    #[inline(always)]
    pub fn is_disabled(&self) -> bool {
        **self == AIAO_CK_GT_EN_A::DISABLED
    }
    #[doc = "Checks if the value of the field is `ENABLED`"]
    #[inline(always)]
    pub fn is_enabled(&self) -> bool {
        **self == AIAO_CK_GT_EN_A::ENABLED
    }
}
impl core::ops::Deref for AIAO_CK_GT_EN_R {
    type Target = crate::FieldReader<bool, AIAO_CK_GT_EN_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `aiao_ck_gt_en` writer - Low power consumption enable."]
pub struct AIAO_CK_GT_EN_W<'a> {
    w: &'a mut W,
}
impl<'a> AIAO_CK_GT_EN_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: AIAO_CK_GT_EN_A) -> &'a mut W {
        self.bit(variant.into())
    }
    #[doc = "Clock disabled."]
    #[inline(always)]
    pub fn disabled(self) -> &'a mut W {
        self.variant(AIAO_CK_GT_EN_A::DISABLED)
    }
    #[doc = "Clock enabled."]
    #[inline(always)]
    pub fn enabled(self) -> &'a mut W {
        self.variant(AIAO_CK_GT_EN_A::ENABLED)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10);
        self.w
    }
}
#[doc = "TX threshold interrupt enable.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TX_LEVEL_INT_MASK_A {
    #[doc = "0: disabled."]
    DISABLED = 0,
    #[doc = "1: enabled."]
    ENABLED = 1,
}
impl From<TX_LEVEL_INT_MASK_A> for bool {
    #[inline(always)]
    fn from(variant: TX_LEVEL_INT_MASK_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `tx_level_int_mask` reader - TX threshold interrupt enable."]
pub struct TX_LEVEL_INT_MASK_R(crate::FieldReader<bool, TX_LEVEL_INT_MASK_A>);
impl TX_LEVEL_INT_MASK_R {
    pub(crate) fn new(bits: bool) -> Self {
        TX_LEVEL_INT_MASK_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> TX_LEVEL_INT_MASK_A {
        match self.bits {
            false => TX_LEVEL_INT_MASK_A::DISABLED,
            true => TX_LEVEL_INT_MASK_A::ENABLED,
        }
    }
    #[doc = "Checks if the value of the field is `DISABLED`"]
    #[inline(always)]
    pub fn is_disabled(&self) -> bool {
        **self == TX_LEVEL_INT_MASK_A::DISABLED
    }
    #[doc = "Checks if the value of the field is `ENABLED`"]
    #[inline(always)]
    pub fn is_enabled(&self) -> bool {
        **self == TX_LEVEL_INT_MASK_A::ENABLED
    }
}
impl core::ops::Deref for TX_LEVEL_INT_MASK_R {
    type Target = crate::FieldReader<bool, TX_LEVEL_INT_MASK_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `tx_level_int_mask` writer - TX threshold interrupt enable."]
pub struct TX_LEVEL_INT_MASK_W<'a> {
    w: &'a mut W,
}
impl<'a> TX_LEVEL_INT_MASK_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: TX_LEVEL_INT_MASK_A) -> &'a mut W {
        self.bit(variant.into())
    }
    #[doc = "disabled."]
    #[inline(always)]
    pub fn disabled(self) -> &'a mut W {
        self.variant(TX_LEVEL_INT_MASK_A::DISABLED)
    }
    #[doc = "enabled."]
    #[inline(always)]
    pub fn enabled(self) -> &'a mut W {
        self.variant(TX_LEVEL_INT_MASK_A::ENABLED)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9);
        self.w
    }
}
#[doc = "TX unfull interrupt enable.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TX_UNFULL_INT_MASK_A {
    #[doc = "0: disabled."]
    DISABLED = 0,
    #[doc = "1: enabled."]
    ENABLED = 1,
}
impl From<TX_UNFULL_INT_MASK_A> for bool {
    #[inline(always)]
    fn from(variant: TX_UNFULL_INT_MASK_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `tx_unfull_int_mask` reader - TX unfull interrupt enable."]
pub struct TX_UNFULL_INT_MASK_R(crate::FieldReader<bool, TX_UNFULL_INT_MASK_A>);
impl TX_UNFULL_INT_MASK_R {
    pub(crate) fn new(bits: bool) -> Self {
        TX_UNFULL_INT_MASK_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> TX_UNFULL_INT_MASK_A {
        match self.bits {
            false => TX_UNFULL_INT_MASK_A::DISABLED,
            true => TX_UNFULL_INT_MASK_A::ENABLED,
        }
    }
    #[doc = "Checks if the value of the field is `DISABLED`"]
    #[inline(always)]
    pub fn is_disabled(&self) -> bool {
        **self == TX_UNFULL_INT_MASK_A::DISABLED
    }
    #[doc = "Checks if the value of the field is `ENABLED`"]
    #[inline(always)]
    pub fn is_enabled(&self) -> bool {
        **self == TX_UNFULL_INT_MASK_A::ENABLED
    }
}
impl core::ops::Deref for TX_UNFULL_INT_MASK_R {
    type Target = crate::FieldReader<bool, TX_UNFULL_INT_MASK_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `tx_unfull_int_mask` writer - TX unfull interrupt enable."]
pub struct TX_UNFULL_INT_MASK_W<'a> {
    w: &'a mut W,
}
impl<'a> TX_UNFULL_INT_MASK_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: TX_UNFULL_INT_MASK_A) -> &'a mut W {
        self.bit(variant.into())
    }
    #[doc = "disabled."]
    #[inline(always)]
    pub fn disabled(self) -> &'a mut W {
        self.variant(TX_UNFULL_INT_MASK_A::DISABLED)
    }
    #[doc = "enabled."]
    #[inline(always)]
    pub fn enabled(self) -> &'a mut W {
        self.variant(TX_UNFULL_INT_MASK_A::ENABLED)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8);
        self.w
    }
}
#[doc = "RX threshold interrupt enable.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RX_LEVEL_INT_MASK_A {
    #[doc = "0: disabled."]
    DISABLED = 0,
    #[doc = "1: enabled."]
    ENABLED = 1,
}
impl From<RX_LEVEL_INT_MASK_A> for bool {
    #[inline(always)]
    fn from(variant: RX_LEVEL_INT_MASK_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `rx_level_int_mask` reader - RX threshold interrupt enable."]
pub struct RX_LEVEL_INT_MASK_R(crate::FieldReader<bool, RX_LEVEL_INT_MASK_A>);
impl RX_LEVEL_INT_MASK_R {
    pub(crate) fn new(bits: bool) -> Self {
        RX_LEVEL_INT_MASK_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> RX_LEVEL_INT_MASK_A {
        match self.bits {
            false => RX_LEVEL_INT_MASK_A::DISABLED,
            true => RX_LEVEL_INT_MASK_A::ENABLED,
        }
    }
    #[doc = "Checks if the value of the field is `DISABLED`"]
    #[inline(always)]
    pub fn is_disabled(&self) -> bool {
        **self == RX_LEVEL_INT_MASK_A::DISABLED
    }
    #[doc = "Checks if the value of the field is `ENABLED`"]
    #[inline(always)]
    pub fn is_enabled(&self) -> bool {
        **self == RX_LEVEL_INT_MASK_A::ENABLED
    }
}
impl core::ops::Deref for RX_LEVEL_INT_MASK_R {
    type Target = crate::FieldReader<bool, RX_LEVEL_INT_MASK_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `rx_level_int_mask` writer - RX threshold interrupt enable."]
pub struct RX_LEVEL_INT_MASK_W<'a> {
    w: &'a mut W,
}
impl<'a> RX_LEVEL_INT_MASK_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: RX_LEVEL_INT_MASK_A) -> &'a mut W {
        self.bit(variant.into())
    }
    #[doc = "disabled."]
    #[inline(always)]
    pub fn disabled(self) -> &'a mut W {
        self.variant(RX_LEVEL_INT_MASK_A::DISABLED)
    }
    #[doc = "enabled."]
    #[inline(always)]
    pub fn enabled(self) -> &'a mut W {
        self.variant(RX_LEVEL_INT_MASK_A::ENABLED)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7);
        self.w
    }
}
#[doc = "RX non-empty interrupt enable.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RX_UNEMPTY_INT_MASK_A {
    #[doc = "0: disabled."]
    DISABLED = 0,
    #[doc = "1: enabled."]
    ENABLED = 1,
}
impl From<RX_UNEMPTY_INT_MASK_A> for bool {
    #[inline(always)]
    fn from(variant: RX_UNEMPTY_INT_MASK_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `rx_unempty_int_mask` reader - RX non-empty interrupt enable."]
pub struct RX_UNEMPTY_INT_MASK_R(crate::FieldReader<bool, RX_UNEMPTY_INT_MASK_A>);
impl RX_UNEMPTY_INT_MASK_R {
    pub(crate) fn new(bits: bool) -> Self {
        RX_UNEMPTY_INT_MASK_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> RX_UNEMPTY_INT_MASK_A {
        match self.bits {
            false => RX_UNEMPTY_INT_MASK_A::DISABLED,
            true => RX_UNEMPTY_INT_MASK_A::ENABLED,
        }
    }
    #[doc = "Checks if the value of the field is `DISABLED`"]
    #[inline(always)]
    pub fn is_disabled(&self) -> bool {
        **self == RX_UNEMPTY_INT_MASK_A::DISABLED
    }
    #[doc = "Checks if the value of the field is `ENABLED`"]
    #[inline(always)]
    pub fn is_enabled(&self) -> bool {
        **self == RX_UNEMPTY_INT_MASK_A::ENABLED
    }
}
impl core::ops::Deref for RX_UNEMPTY_INT_MASK_R {
    type Target = crate::FieldReader<bool, RX_UNEMPTY_INT_MASK_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `rx_unempty_int_mask` writer - RX non-empty interrupt enable."]
pub struct RX_UNEMPTY_INT_MASK_W<'a> {
    w: &'a mut W,
}
impl<'a> RX_UNEMPTY_INT_MASK_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: RX_UNEMPTY_INT_MASK_A) -> &'a mut W {
        self.bit(variant.into())
    }
    #[doc = "disabled."]
    #[inline(always)]
    pub fn disabled(self) -> &'a mut W {
        self.variant(RX_UNEMPTY_INT_MASK_A::DISABLED)
    }
    #[doc = "enabled."]
    #[inline(always)]
    pub fn enabled(self) -> &'a mut W {
        self.variant(RX_UNEMPTY_INT_MASK_A::ENABLED)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6);
        self.w
    }
}
#[doc = "DMA TX enable.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DMA_TX_EN_A {
    #[doc = "0: disabled."]
    DISABLED = 0,
    #[doc = "1: enabled."]
    ENABLED = 1,
}
impl From<DMA_TX_EN_A> for bool {
    #[inline(always)]
    fn from(variant: DMA_TX_EN_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `dma_tx_en` reader - DMA TX enable."]
pub struct DMA_TX_EN_R(crate::FieldReader<bool, DMA_TX_EN_A>);
impl DMA_TX_EN_R {
    pub(crate) fn new(bits: bool) -> Self {
        DMA_TX_EN_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> DMA_TX_EN_A {
        match self.bits {
            false => DMA_TX_EN_A::DISABLED,
            true => DMA_TX_EN_A::ENABLED,
        }
    }
    #[doc = "Checks if the value of the field is `DISABLED`"]
    #[inline(always)]
    pub fn is_disabled(&self) -> bool {
        **self == DMA_TX_EN_A::DISABLED
    }
    #[doc = "Checks if the value of the field is `ENABLED`"]
    #[inline(always)]
    pub fn is_enabled(&self) -> bool {
        **self == DMA_TX_EN_A::ENABLED
    }
}
impl core::ops::Deref for DMA_TX_EN_R {
    type Target = crate::FieldReader<bool, DMA_TX_EN_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `dma_tx_en` writer - DMA TX enable."]
pub struct DMA_TX_EN_W<'a> {
    w: &'a mut W,
}
impl<'a> DMA_TX_EN_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: DMA_TX_EN_A) -> &'a mut W {
        self.bit(variant.into())
    }
    #[doc = "disabled."]
    #[inline(always)]
    pub fn disabled(self) -> &'a mut W {
        self.variant(DMA_TX_EN_A::DISABLED)
    }
    #[doc = "enabled."]
    #[inline(always)]
    pub fn enabled(self) -> &'a mut W {
        self.variant(DMA_TX_EN_A::ENABLED)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5);
        self.w
    }
}
#[doc = "DMA RX enable.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DMA_RX_EN_A {
    #[doc = "0: disabled."]
    DISABLED = 0,
    #[doc = "1: enabled."]
    ENABLED = 1,
}
impl From<DMA_RX_EN_A> for bool {
    #[inline(always)]
    fn from(variant: DMA_RX_EN_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `dma_rx_en` reader - DMA RX enable."]
pub struct DMA_RX_EN_R(crate::FieldReader<bool, DMA_RX_EN_A>);
impl DMA_RX_EN_R {
    pub(crate) fn new(bits: bool) -> Self {
        DMA_RX_EN_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> DMA_RX_EN_A {
        match self.bits {
            false => DMA_RX_EN_A::DISABLED,
            true => DMA_RX_EN_A::ENABLED,
        }
    }
    #[doc = "Checks if the value of the field is `DISABLED`"]
    #[inline(always)]
    pub fn is_disabled(&self) -> bool {
        **self == DMA_RX_EN_A::DISABLED
    }
    #[doc = "Checks if the value of the field is `ENABLED`"]
    #[inline(always)]
    pub fn is_enabled(&self) -> bool {
        **self == DMA_RX_EN_A::ENABLED
    }
}
impl core::ops::Deref for DMA_RX_EN_R {
    type Target = crate::FieldReader<bool, DMA_RX_EN_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `dma_rx_en` writer - DMA RX enable."]
pub struct DMA_RX_EN_W<'a> {
    w: &'a mut W,
}
impl<'a> DMA_RX_EN_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: DMA_RX_EN_A) -> &'a mut W {
        self.bit(variant.into())
    }
    #[doc = "disabled."]
    #[inline(always)]
    pub fn disabled(self) -> &'a mut W {
        self.variant(DMA_RX_EN_A::DISABLED)
    }
    #[doc = "enabled."]
    #[inline(always)]
    pub fn enabled(self) -> &'a mut W {
        self.variant(DMA_RX_EN_A::ENABLED)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4);
        self.w
    }
}
#[doc = "Output BCLK phase reverse enable.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum BCLK_INV_EN_A {
    #[doc = "0: The output BCLK phase does not change."]
    NO_INVERT = 0,
    #[doc = "1: The Output BCLK phase is inverted."]
    INVERT = 1,
}
impl From<BCLK_INV_EN_A> for bool {
    #[inline(always)]
    fn from(variant: BCLK_INV_EN_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `bclk_inv_en` reader - Output BCLK phase reverse enable."]
pub struct BCLK_INV_EN_R(crate::FieldReader<bool, BCLK_INV_EN_A>);
impl BCLK_INV_EN_R {
    pub(crate) fn new(bits: bool) -> Self {
        BCLK_INV_EN_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> BCLK_INV_EN_A {
        match self.bits {
            false => BCLK_INV_EN_A::NO_INVERT,
            true => BCLK_INV_EN_A::INVERT,
        }
    }
    #[doc = "Checks if the value of the field is `NO_INVERT`"]
    #[inline(always)]
    pub fn is_no_invert(&self) -> bool {
        **self == BCLK_INV_EN_A::NO_INVERT
    }
    #[doc = "Checks if the value of the field is `INVERT`"]
    #[inline(always)]
    pub fn is_invert(&self) -> bool {
        **self == BCLK_INV_EN_A::INVERT
    }
}
impl core::ops::Deref for BCLK_INV_EN_R {
    type Target = crate::FieldReader<bool, BCLK_INV_EN_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `bclk_inv_en` writer - Output BCLK phase reverse enable."]
pub struct BCLK_INV_EN_W<'a> {
    w: &'a mut W,
}
impl<'a> BCLK_INV_EN_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: BCLK_INV_EN_A) -> &'a mut W {
        self.bit(variant.into())
    }
    #[doc = "The output BCLK phase does not change."]
    #[inline(always)]
    pub fn no_invert(self) -> &'a mut W {
        self.variant(BCLK_INV_EN_A::NO_INVERT)
    }
    #[doc = "The Output BCLK phase is inverted."]
    #[inline(always)]
    pub fn invert(self) -> &'a mut W {
        self.variant(BCLK_INV_EN_A::INVERT)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3);
        self.w
    }
}
#[doc = "TX enable.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TX_EN_A {
    #[doc = "0: disabled."]
    DISABLED = 0,
    #[doc = "1: enabled."]
    ENABLED = 1,
}
impl From<TX_EN_A> for bool {
    #[inline(always)]
    fn from(variant: TX_EN_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `tx_en` reader - TX enable."]
pub struct TX_EN_R(crate::FieldReader<bool, TX_EN_A>);
impl TX_EN_R {
    pub(crate) fn new(bits: bool) -> Self {
        TX_EN_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> TX_EN_A {
        match self.bits {
            false => TX_EN_A::DISABLED,
            true => TX_EN_A::ENABLED,
        }
    }
    #[doc = "Checks if the value of the field is `DISABLED`"]
    #[inline(always)]
    pub fn is_disabled(&self) -> bool {
        **self == TX_EN_A::DISABLED
    }
    #[doc = "Checks if the value of the field is `ENABLED`"]
    #[inline(always)]
    pub fn is_enabled(&self) -> bool {
        **self == TX_EN_A::ENABLED
    }
}
impl core::ops::Deref for TX_EN_R {
    type Target = crate::FieldReader<bool, TX_EN_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `tx_en` writer - TX enable."]
pub struct TX_EN_W<'a> {
    w: &'a mut W,
}
impl<'a> TX_EN_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: TX_EN_A) -> &'a mut W {
        self.bit(variant.into())
    }
    #[doc = "disabled."]
    #[inline(always)]
    pub fn disabled(self) -> &'a mut W {
        self.variant(TX_EN_A::DISABLED)
    }
    #[doc = "enabled."]
    #[inline(always)]
    pub fn enabled(self) -> &'a mut W {
        self.variant(TX_EN_A::ENABLED)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2);
        self.w
    }
}
#[doc = "RX enable.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RX_EN_A {
    #[doc = "0: disabled."]
    DISABLED = 0,
    #[doc = "1: enabled."]
    ENABLED = 1,
}
impl From<RX_EN_A> for bool {
    #[inline(always)]
    fn from(variant: RX_EN_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `rx_en` reader - RX enable."]
pub struct RX_EN_R(crate::FieldReader<bool, RX_EN_A>);
impl RX_EN_R {
    pub(crate) fn new(bits: bool) -> Self {
        RX_EN_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> RX_EN_A {
        match self.bits {
            false => RX_EN_A::DISABLED,
            true => RX_EN_A::ENABLED,
        }
    }
    #[doc = "Checks if the value of the field is `DISABLED`"]
    #[inline(always)]
    pub fn is_disabled(&self) -> bool {
        **self == RX_EN_A::DISABLED
    }
    #[doc = "Checks if the value of the field is `ENABLED`"]
    #[inline(always)]
    pub fn is_enabled(&self) -> bool {
        **self == RX_EN_A::ENABLED
    }
}
impl core::ops::Deref for RX_EN_R {
    type Target = crate::FieldReader<bool, RX_EN_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `rx_en` writer - RX enable."]
pub struct RX_EN_W<'a> {
    w: &'a mut W,
}
impl<'a> RX_EN_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: RX_EN_A) -> &'a mut W {
        self.bit(variant.into())
    }
    #[doc = "disabled."]
    #[inline(always)]
    pub fn disabled(self) -> &'a mut W {
        self.variant(RX_EN_A::DISABLED)
    }
    #[doc = "enabled."]
    #[inline(always)]
    pub fn enabled(self) -> &'a mut W {
        self.variant(RX_EN_A::ENABLED)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1);
        self.w
    }
}
#[doc = "Bit width.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DATA_BIT_A {
    #[doc = "0: 16-bit."]
    WIDTH_16 = 0,
    #[doc = "1: 24-bit."]
    WIDTH_24 = 1,
}
impl From<DATA_BIT_A> for bool {
    #[inline(always)]
    fn from(variant: DATA_BIT_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `data_bit` reader - Bit width."]
pub struct DATA_BIT_R(crate::FieldReader<bool, DATA_BIT_A>);
impl DATA_BIT_R {
    pub(crate) fn new(bits: bool) -> Self {
        DATA_BIT_R(crate::FieldReader::new(bits))
    }
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> DATA_BIT_A {
        match self.bits {
            false => DATA_BIT_A::WIDTH_16,
            true => DATA_BIT_A::WIDTH_24,
        }
    }
    #[doc = "Checks if the value of the field is `WIDTH_16`"]
    #[inline(always)]
    pub fn is_width_16(&self) -> bool {
        **self == DATA_BIT_A::WIDTH_16
    }
    #[doc = "Checks if the value of the field is `WIDTH_24`"]
    #[inline(always)]
    pub fn is_width_24(&self) -> bool {
        **self == DATA_BIT_A::WIDTH_24
    }
}
impl core::ops::Deref for DATA_BIT_R {
    type Target = crate::FieldReader<bool, DATA_BIT_A>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `data_bit` writer - Bit width."]
pub struct DATA_BIT_W<'a> {
    w: &'a mut W,
}
impl<'a> DATA_BIT_W<'a> {
    #[doc = r"Writes `variant` to the field"]
    #[inline(always)]
    pub fn variant(self, variant: DATA_BIT_A) -> &'a mut W {
        self.bit(variant.into())
    }
    #[doc = "16-bit."]
    #[inline(always)]
    pub fn width_16(self) -> &'a mut W {
        self.variant(DATA_BIT_A::WIDTH_16)
    }
    #[doc = "24-bit."]
    #[inline(always)]
    pub fn width_24(self) -> &'a mut W {
        self.variant(DATA_BIT_A::WIDTH_24)
    }
    #[doc = r"Sets the field bit"]
    #[inline(always)]
    pub fn set_bit(self) -> &'a mut W {
        self.bit(true)
    }
    #[doc = r"Clears the field bit"]
    #[inline(always)]
    pub fn clear_bit(self) -> &'a mut W {
        self.bit(false)
    }
    #[doc = r"Writes raw bits to the field"]
    #[inline(always)]
    pub fn bit(self, value: bool) -> &'a mut W {
        self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01);
        self.w
    }
}
impl R {
    #[doc = "Bit 25 - TX FIFO underflow interrupt enable."]
    #[inline(always)]
    pub fn tx_rerror_int_mask(&self) -> TX_RERROR_INT_MASK_R {
        TX_RERROR_INT_MASK_R::new(((self.bits >> 25) & 0x01) != 0)
    }
    #[doc = "Bit 24 - RX FIFO overflow interrupt enable."]
    #[inline(always)]
    pub fn rx_werror_int_mask(&self) -> RX_WERROR_INT_MASK_R {
        RX_WERROR_INT_MASK_R::new(((self.bits >> 24) & 0x01) != 0)
    }
    #[doc = "Bits 21:23 - Frequency ratio of BCLK to WS."]
    #[inline(always)]
    pub fn aiao_fsclk_div(&self) -> AIAO_FSCLK_DIV_R {
        AIAO_FSCLK_DIV_R::new(((self.bits >> 21) & 0x07) as u8)
    }
    #[doc = "Bits 17:20 - Frequency ratio of MCLK to BCLK."]
    #[inline(always)]
    pub fn aiao_bclk_div(&self) -> AIAO_BCLK_DIV_R {
        AIAO_BCLK_DIV_R::new(((self.bits >> 17) & 0x0f) as u8)
    }
    #[doc = "Bits 14:16 - TX FIFO threshold."]
    #[inline(always)]
    pub fn dma_tx_level(&self) -> DMA_TX_LEVEL_R {
        DMA_TX_LEVEL_R::new(((self.bits >> 14) & 0x07) as u8)
    }
    #[doc = "Bits 11:13 - RX FIFO threshold."]
    #[inline(always)]
    pub fn dma_rx_level(&self) -> DMA_RX_LEVEL_R {
        DMA_RX_LEVEL_R::new(((self.bits >> 11) & 0x07) as u8)
    }
    #[doc = "Bit 10 - Low power consumption enable."]
    #[inline(always)]
    pub fn aiao_ck_gt_en(&self) -> AIAO_CK_GT_EN_R {
        AIAO_CK_GT_EN_R::new(((self.bits >> 10) & 0x01) != 0)
    }
    #[doc = "Bit 9 - TX threshold interrupt enable."]
    #[inline(always)]
    pub fn tx_level_int_mask(&self) -> TX_LEVEL_INT_MASK_R {
        TX_LEVEL_INT_MASK_R::new(((self.bits >> 9) & 0x01) != 0)
    }
    #[doc = "Bit 8 - TX unfull interrupt enable."]
    #[inline(always)]
    pub fn tx_unfull_int_mask(&self) -> TX_UNFULL_INT_MASK_R {
        TX_UNFULL_INT_MASK_R::new(((self.bits >> 8) & 0x01) != 0)
    }
    #[doc = "Bit 7 - RX threshold interrupt enable."]
    #[inline(always)]
    pub fn rx_level_int_mask(&self) -> RX_LEVEL_INT_MASK_R {
        RX_LEVEL_INT_MASK_R::new(((self.bits >> 7) & 0x01) != 0)
    }
    #[doc = "Bit 6 - RX non-empty interrupt enable."]
    #[inline(always)]
    pub fn rx_unempty_int_mask(&self) -> RX_UNEMPTY_INT_MASK_R {
        RX_UNEMPTY_INT_MASK_R::new(((self.bits >> 6) & 0x01) != 0)
    }
    #[doc = "Bit 5 - DMA TX enable."]
    #[inline(always)]
    pub fn dma_tx_en(&self) -> DMA_TX_EN_R {
        DMA_TX_EN_R::new(((self.bits >> 5) & 0x01) != 0)
    }
    #[doc = "Bit 4 - DMA RX enable."]
    #[inline(always)]
    pub fn dma_rx_en(&self) -> DMA_RX_EN_R {
        DMA_RX_EN_R::new(((self.bits >> 4) & 0x01) != 0)
    }
    #[doc = "Bit 3 - Output BCLK phase reverse enable."]
    #[inline(always)]
    pub fn bclk_inv_en(&self) -> BCLK_INV_EN_R {
        BCLK_INV_EN_R::new(((self.bits >> 3) & 0x01) != 0)
    }
    #[doc = "Bit 2 - TX enable."]
    #[inline(always)]
    pub fn tx_en(&self) -> TX_EN_R {
        TX_EN_R::new(((self.bits >> 2) & 0x01) != 0)
    }
    #[doc = "Bit 1 - RX enable."]
    #[inline(always)]
    pub fn rx_en(&self) -> RX_EN_R {
        RX_EN_R::new(((self.bits >> 1) & 0x01) != 0)
    }
    #[doc = "Bit 0 - Bit width."]
    #[inline(always)]
    pub fn data_bit(&self) -> DATA_BIT_R {
        DATA_BIT_R::new((self.bits & 0x01) != 0)
    }
}
impl W {
    #[doc = "Bit 25 - TX FIFO underflow interrupt enable."]
    #[inline(always)]
    pub fn tx_rerror_int_mask(&mut self) -> TX_RERROR_INT_MASK_W {
        TX_RERROR_INT_MASK_W { w: self }
    }
    #[doc = "Bit 24 - RX FIFO overflow interrupt enable."]
    #[inline(always)]
    pub fn rx_werror_int_mask(&mut self) -> RX_WERROR_INT_MASK_W {
        RX_WERROR_INT_MASK_W { w: self }
    }
    #[doc = "Bits 21:23 - Frequency ratio of BCLK to WS."]
    #[inline(always)]
    pub fn aiao_fsclk_div(&mut self) -> AIAO_FSCLK_DIV_W {
        AIAO_FSCLK_DIV_W { w: self }
    }
    #[doc = "Bits 17:20 - Frequency ratio of MCLK to BCLK."]
    #[inline(always)]
    pub fn aiao_bclk_div(&mut self) -> AIAO_BCLK_DIV_W {
        AIAO_BCLK_DIV_W { w: self }
    }
    #[doc = "Bits 14:16 - TX FIFO threshold."]
    #[inline(always)]
    pub fn dma_tx_level(&mut self) -> DMA_TX_LEVEL_W {
        DMA_TX_LEVEL_W { w: self }
    }
    #[doc = "Bits 11:13 - RX FIFO threshold."]
    #[inline(always)]
    pub fn dma_rx_level(&mut self) -> DMA_RX_LEVEL_W {
        DMA_RX_LEVEL_W { w: self }
    }
    #[doc = "Bit 10 - Low power consumption enable."]
    #[inline(always)]
    pub fn aiao_ck_gt_en(&mut self) -> AIAO_CK_GT_EN_W {
        AIAO_CK_GT_EN_W { w: self }
    }
    #[doc = "Bit 9 - TX threshold interrupt enable."]
    #[inline(always)]
    pub fn tx_level_int_mask(&mut self) -> TX_LEVEL_INT_MASK_W {
        TX_LEVEL_INT_MASK_W { w: self }
    }
    #[doc = "Bit 8 - TX unfull interrupt enable."]
    #[inline(always)]
    pub fn tx_unfull_int_mask(&mut self) -> TX_UNFULL_INT_MASK_W {
        TX_UNFULL_INT_MASK_W { w: self }
    }
    #[doc = "Bit 7 - RX threshold interrupt enable."]
    #[inline(always)]
    pub fn rx_level_int_mask(&mut self) -> RX_LEVEL_INT_MASK_W {
        RX_LEVEL_INT_MASK_W { w: self }
    }
    #[doc = "Bit 6 - RX non-empty interrupt enable."]
    #[inline(always)]
    pub fn rx_unempty_int_mask(&mut self) -> RX_UNEMPTY_INT_MASK_W {
        RX_UNEMPTY_INT_MASK_W { w: self }
    }
    #[doc = "Bit 5 - DMA TX enable."]
    #[inline(always)]
    pub fn dma_tx_en(&mut self) -> DMA_TX_EN_W {
        DMA_TX_EN_W { w: self }
    }
    #[doc = "Bit 4 - DMA RX enable."]
    #[inline(always)]
    pub fn dma_rx_en(&mut self) -> DMA_RX_EN_W {
        DMA_RX_EN_W { w: self }
    }
    #[doc = "Bit 3 - Output BCLK phase reverse enable."]
    #[inline(always)]
    pub fn bclk_inv_en(&mut self) -> BCLK_INV_EN_W {
        BCLK_INV_EN_W { w: self }
    }
    #[doc = "Bit 2 - TX enable."]
    #[inline(always)]
    pub fn tx_en(&mut self) -> TX_EN_W {
        TX_EN_W { w: self }
    }
    #[doc = "Bit 1 - RX enable."]
    #[inline(always)]
    pub fn rx_en(&mut self) -> RX_EN_W {
        RX_EN_W { w: self }
    }
    #[doc = "Bit 0 - Bit width."]
    #[inline(always)]
    pub fn data_bit(&mut self) -> DATA_BIT_W {
        DATA_BIT_W { w: self }
    }
    #[doc = "Writes raw bits to the register."]
    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
        self.0.bits(bits);
        self
    }
}
#[doc = "AUDIO_AIAO_CTRL is the control register.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [audio_aiao_ctrl](index.html) module"]
pub struct AUDIO_AIAO_CTRL_SPEC;
impl crate::RegisterSpec for AUDIO_AIAO_CTRL_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [audio_aiao_ctrl::R](R) reader structure"]
impl crate::Readable for AUDIO_AIAO_CTRL_SPEC {
    type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [audio_aiao_ctrl::W](W) writer structure"]
impl crate::Writable for AUDIO_AIAO_CTRL_SPEC {
    type Writer = W;
}
#[doc = "`reset()` method sets AUDIO_AIAO_CTRL to value 0x0070_9000"]
impl crate::Resettable for AUDIO_AIAO_CTRL_SPEC {
    #[inline(always)]
    fn reset_value() -> Self::Ux {
        0x0070_9000
    }
}
